package Try;

import java.io.*;

public class Main21 {
    public static void main(String[] args) throws IOException {

//        String format = "000000";
//        DecimalFormat df;

        File f = new File("E:\\Picture\\clean_research\\cloth");
        File[] subFiles = f.listFiles();
        File writeFile = new File("E:\\Picture\\clean_research\\clothList.txt");
        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(writeFile)));

        for (File ff:subFiles){
            File[] subFFiles = ff.listFiles();
            for (File fff:subFFiles){
                File[] subFFFiles = fff.listFiles();

                for (File ffff:subFFFiles){
                    File[] subFFFFiles = ffff.listFiles();
                    for (File fffff:subFFFFiles){
                        String path = fffff.getAbsolutePath();
                        path = path.replace("E:\\Picture\\clean_research\\","");
                        path = path.replace("\\","/");
//                        System.out.println(path);
                        writer.write(path);
                        writer.newLine();
                    }
                }
            }
        }
        writer.close();
    }
}
